package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import com.sdicons.json.validator.impl.predicates.True;

import cn.com.api.entity.ApiU_stat_keywords;

//DAO
public interface U_stat_keywordsMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_STAT_KEYWORDS  WHERE STAT_ID = #{stat_id}")
	public ApiU_stat_keywords findU_stat_keywordsById(Integer stat_id);

	// 查看数据集
	@Select("SELECT * FROM U_stat_keywords")
	public List<ApiU_stat_keywords> findU_stat_keywordss();

	// 添加
	@Insert("INSERT INTO U_STAT_KEYWORDS (SOURCE, IP, TYPE, PV_COUNT, IP_COUNT, VISIT_COUNT, KEYWORD, CREATE_TIME, USER_ID, PAGE_URL, ENTRY_URL, EXT_1, EXT_2, EXT_3, EXT_4, EXT_5, UPDATE_TIME) VALUES (#{source}, #{ip}, #{type}, #{pv_count}, #{ip_count}, #{visit_count}, #{keyword}, #{create_time}, #{user_id}, #{page_url}, #{entry_url}, #{ext_1}, #{ext_2}, #{ext_3}, #{ext_4}, #{ext_5}, #{update_time})")
	@Options(useGeneratedKeys = true, keyProperty = "stat_id")
	public int insertU_stat_keywords(ApiU_stat_keywords u_stat_keywords);

	// 修改
	@Update("UPDATE U_STAT_KEYWORDS SET SOURCE = #{source}, IP = #{ip}, TYPE = #{type}, PV_COUNT = #{pv_count}, IP_COUNT = #{ip_count}, VISIT_COUNT = #{visit_count}, KEYWORD = #{keyword}, CREATE_TIME = #{create_time}, USER_ID = #{user_id}, PAGE_URL = #{page_url}, ENTRY_URL = #{entry_url}, EXT_1 = #{ext_1}, EXT_2 = #{ext_2}, EXT_3 = #{ext_3}, EXT_4 = #{ext_4}, EXT_5 = #{ext_5}, UPDATE_TIME = #{update_time} WHERE STAT_ID = #{stat_id}")
	public int updateU_stat_keywords(ApiU_stat_keywords u_stat_keywords);

	// 删除
	@Delete("DELETE FROM U_STAT_KEYWORDS  WHERE STAT_ID = #{stat_id}")
	public int deleteU_stat_keywords(Integer stat_id);

	// Foreign keys revelant

	// region Indexs revelant

}
